{% block thumbnail %}
<figure class=thumbnail>
    <a class=thumbnail-link href="{{ get_url(path=page.path) }}" aria-label="{{ page.title }}">
    {%- if page.extra.thumbnail %}
        {%- set image_path = page.colocated_path ~ page.extra.thumbnail %}
        {%- set image = resize_image(path=image_path, width=config.extra.thumbnail_size*2, height=config.extra.thumbnail_size*2, format=config.extra.thumbnail_format, quality=config.extra.thumbnail_quality, op="fill") %}
        <img width="{{ config.extra.thumbnail_size }}" height="{{ config.extra.thumbnail_size }}" src="{{ image.url }}" alt="{{ page.title }}"/>
    {%- else %}
        {%- set image = resize_image(path="img/missing.webp", width=config.extra.thumbnail_size, height=config.extra.thumbnail_size, format=config.extra.thumbnail_format, quality=config.extra.thumbnail_quality, op="fill") %}
        <img width="{{ config.extra.thumbnail_size }}" height="{{ config.extra.thumbnail_size }}" src="{{ image.url }}" alt="{{ page.title }}" />
    {%- endif %}
        <div class=thumbnail-overlay>
            <div class=thumbnail-info>
                {{ page.title }}
            </div>
        </div>
    </a>
</figure>
{% endblock thumbnail %}